#ifndef __TEXTURE_H__
#define __TEXTURE_H__

#include "Color.h"
#include "Image.h"
#include "Object.h"

class Texture : public Object
{
public:
	Texture();
	virtual ~Texture();

	void set_image( Image* image );
	Image* get_image();

	enum CorrectionMode
	{
		CM_AFFINE,
		CM_PERSPECTIVE,
		CM_QUANTITY
	};

	CorrectionMode& correction();

	enum ApplyMode
	{
		GL_REPLACE,
		GL_DECAL,
		GL_MODULATE,
		GL_BLEND,
		AM_QUANTITY
	};

	ApplyMode& apply();
	Color& blend_color();

	enum WrapMode
	{
		WM_CLAMP_S_CLAMP_T,
		WM_CLAMP_S_WRAP_T,
		WM_WRAP_S_CLAMP_T,
		WM_WRAP_S_WRAP_T,
		WM_QUANTITY
	};

	WrapMode& wrap();

	enum FilterMode
	{
		GL_NEAREST,
		GL_LINEAR,
		FM_QUANTITY
	};

	FilterMode& filter();

	enum MipmapMode
	{
		GL_NONE,
		GL_NEAREST,
		GL_LINEAR,
		GL_NEAREST_NEAREST,
		GL_NEAREST_LINEAR,
		GL_LINEAR_LINEAR,
		MM_QUANTITY
	};

	MipmapMode& mipmap();

	Real& priority();
	unsigned int& user_data();

protected:
	ImagePtr m_image;
	CorrectionMode m_correction;
	ApplyMode m_apply;
	Color m_blend_color;
	WrapMode m_wrap;
	FilterMode m_filter;
	MipmapMode m_mipmap;
	Real m_priority;
	unsigned int m_user_data;
};

#include "Texture.inl"

#endif

	

